﻿

using Dapper;
using HBase;
using System;
using System.Collections.Generic;
using System.Data;
namespace hCommand {
    public interface IBaseServer {
        Page<T> queryPage<T>(string sql ,string orderBy ,PageDto param = null);//分页查询
        T getById<T>(long id ) where T : class;//根据id查询
        List<T> GetAll<T>(string whereStr = null ,object param = null) where T : class;
        List<T> getAll<T>(string tableName ,string whereStr = null ,object param = null ,string orderField = "") where T : class;
        List<T> GetField<T>(string fields ,string where = null ,object param = null) where T : class;
        long insert<T>(T t) where T : class;
        long insertNotNull<T>(T t) where T : class;
        void delete<T>(long id) where T : class;
        void delete<T>(string where ,object param) where T : class;
        bool delete(BaseEntity id);
     
        bool update<T>(T t) where T : class;
        bool updateNotNull<T>(T t) where T : class;

        void execProcedure(String name,DynamicParameters p);
         String execProcedure(String name,params object[] p);
     
    }
}
